package com.shangke.corejava.ch13;

public class Test3 extends Thread {
	private String name;

	// 封装
	public Test3(String name) {
		super();
		this.name = name;
	}

	// 对父类的 run 方法进行重写
	@Override
	public void run() {
		for (int i = 0; i < 200; i++) { // 遍历200次
			System.out.println("线程" + name + "正在运行");
		}
	}

	public static void main(String[] args) {
		Test3 test3 = new Test3("1");
		test3.setPriority(10); // 设置线程的优先级别
		test3.start();

		Test3 test32 = new Test3("2");
		test32.setPriority(6);
		test32.start();
	}
}
